#ifndef MEDIAPLAYER_H
#define MEDIAPLAYER_H

class QMediaPlayer;
class QMediaPlaylist;
#include <QWidget>

class MediaPlayer : QWidget
{
    Q_OBJECT
public:
    explicit MediaPlayer(QWidget *parent = 0);

    void Play(QString file);
    void Stop();
    void Pause();

    QString getInfo() { return m_info; }

public slots:
    void setVolume(int vol);
    int  getVolume();

    void updateSongInfo();
private:
    QMediaPlayer    *m_player;
    QMediaPlaylist  *m_playlist;
    QString         m_info;
};

#endif // MEDIAPLAYER_H
